<template>
  <div class="app">
    <h2>我是App</h2>
    <Child v-for="item in children" :key="item.id" :a="item"/>

   <!--  <h4 v-for="item in children" :key="item.id">
      {{item}}
    </h4> -->
  </div>
</template>

<script>
  import Child from "./components/Child.vue";
  export default {
    name:'App',
    components:{Child},
    data() {
      return {
        children:[
          {id:'asfdyf01',name:'张国庆',age:18},
          {id:'asfdyf02',name:'张爱国',age:19},
          {id:'asfdyf03',name:'张美丽',age:20},
          {id:'asfdyf04',name:'张爱玲',age:22},
        ]
      }
    },
  }
</script>

<style>
  .app {
    background-color: #ddd;
    padding: 20px;
    border-radius: 10px;
  }
</style>